<script setup lang="ts">
import { ElConfigProvider } from 'element-plus'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import HanderView from './views/hander.vue'
import Footer from './components/footer.vue'
import Suspend from './components/suspend.vue'
</script>



<template>
  <el-config-provider :locale="zhCn">
     <div class="common-layout">
    <el-container>
      <el-header><HanderView/></el-header>
       <el-container>
          <!-- 左侧导航栏 -->
          <el-aside v-if="showSidebar" width="220px" class="sidebar">
            <el-menu
              default-active="intention"
              class="el-menu-vertical"
              @select="(index) => {
                const section = document.getElementById(index);
                if (section) section.scrollIntoView({ behavior: 'smooth' });
              }"
            >
              <el-menu-item index="intention">
                <span>企业创立初衷</span>
              </el-menu-item>
              <el-menu-item index="develop">
                <span>企业发展历程</span>
              </el-menu-item>
              <el-menu-item index="plan">
                <span>企业一五规划</span>
              </el-menu-item>
              <el-menu-item index="culture">
                <span>企业核心价值观</span>
              </el-menu-item>
              <el-menu-item index="salary">
                <span>企业盈利分配</span>
              </el-menu-item>
              <el-menu-item index="manage">
                <span>企业运营管理</span>
              </el-menu-item>
            </el-menu>
          </el-aside>
          
          <el-main>
            <router-view/>
          </el-main>
        </el-container>
      <el-footer>
        <Footer></Footer>
      </el-footer>
    </el-container>
  </div>
  </el-config-provider>
</template>

<style lang="scss" scoped>
.common-layout{
  background-color: #f9fafb;
}

</style>
